/*
 * p1388.cpp
 *
 *  Created on: 2013-4-20
 *      Author: zy
 */

#include<cstdio>
#include<cmath>
int main()
{
	int n,m;
	while(scanf("%d%d",&n,&m)!=EOF)
	{
		double ans=0.0;
		for(int i=1;i<n;i++)
		{
			double pos=(double)i/n*(n+m);
			ans+=fabs(pos-floor(pos+0.5))/(n+m);
		}
		printf("%0.4lf\n",ans*10000);
	}
	return 0;
}
